﻿using System.Data;

namespace ConfExpert.Forms.Depo._7C
{
    public partial class xrSubEn : DevExpress.XtraReports.UI.XtraReport
    {
        public xrSubEn()
        {
            InitializeComponent();            
        }

        DataSet ds;
        DataTable dtEn;
        public void fillTable(DataTable dt)
        {
            ds = new DataSet();
            dtEn = new DataTable("dtEn");
            ds.Tables.Add(dtEn);
            dtEn.Merge(dt);

            this.DataMember = dtEn.TableName;
            this.DataSource = ds;
        }

        private void Detail_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            this.DataMember = dtEn.TableName;
            this.DataSource = ds;

            //string a = GetCurrentColumnValue("ProductId").ToString();

            tcQty.DataBindings.Add("Text", null, "dtEn.En", "{0:n0}");
            tcMetraj.DataBindings.Add("Text", null, "dtEn.Metraj", "{0:0.0}");
            //tcQty.DataBindings.Add("Text", null, "dtEn.Qty", "{0:n0}");            
            //tcAdet.DataBindings.Add("Text", null, "dtEn.Adet");
        }
    }
}
